﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using AppToolkit.WPF.UI.Converters;
using System.Windows;

namespace AppToolkit.WPF.Tests.UI.Converters
{
    [TestFixture]
    public class ExceptionTypeConverterTests
    {

        [Test]
        public void Converter_returns_typename()
        {
            ExceptionTypeConverter target = new ExceptionTypeConverter();
            
            ArgumentException ex = new ArgumentException("Test");
            Assert.AreEqual("ArgumentException", (string)target.Convert(ex, typeof(string), null, null));
        }

        [Test]
        public void Converter_returns_UnsetValue_in_case_of_null_passed()
        {
            ExceptionTypeConverter target = new ExceptionTypeConverter();

            Assert.AreEqual(DependencyProperty.UnsetValue, target.Convert(null, typeof(string), null, null));
        }
    }
}
